<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body>div{
            width: 200px; height: 200px;
            background-color: green;
            margin: 100px 0 0 100px;
            overflow: hidden;
            position: relative;/*参照物*/
        }
        body>div>div{
            width: 100px; height: 100px;
            background-color: blue;
            margin: 50px 0 0 50px;
            position: relative;/*参照物*//*两个上级元素都加，就近原则*/
            /*默认坐标相对于窗口，也可以相当于某个上级元素
            需要给上级元素添加position: relative*/
        }
        body>div>div>div{
            width: 50px; height: 50px;
            background-color: red;
            position: absolute;/*绝对定位*/
            left: 0;
            top: 0;

        }
    </style>
</head>
<body>
<div>
    <div>
        <div>
        </div>
    </div>
</div>
</body>
</html>